<template>
  <el-config-provider :locale="zhCn">
    <ZWLayout />
  </el-config-provider>
</template>

<script lang="ts" setup>
  import { onMounted } from 'vue'
  import { ElConfigProvider, ElNotification } from 'element-plus'
  import zhCn from 'element-plus/lib/locale/lang/zh-cn'
  import ZWLayout from '@/components/global/ZWLayout.vue'

  onMounted(() => {
    var ratio = window.devicePixelRatio || window.screen.deviceXDPI / window.screen.logicalXDPI
    if (ratio != 1 && ratio != 2 && ratio != 3) {
      // let zoom = Math.round((1 / ratio) * 100)

      ElNotification({
        title: '最佳视觉建议',
        message: `你的浏览器目前处于缩放状态，页面可能会出现错位现象，建议调整缩放大小。`,
        duration: 0
      })
    }
  })
</script>

<style lang="scss">
  @import '@/assets/css/reset.scss';
  @import '@/assets/css/reset-element.scss';
  @import '@/assets/css/common.scss';
</style>
